package com.helloworld.demo;

import org.openjdk.jol.info.ClassLayout;

public class JOLSample {

    public static void main(String[] args) {

        ClassLayout classLayout = ClassLayout.parseInstance(new Object());
        System.out.println(classLayout.toPrintable());

        ClassLayout classLayout1 = ClassLayout.parseInstance(new int[]{});
        System.out.println(classLayout1.toPrintable());

        ClassLayout classLayout2 = ClassLayout.parseInstance(new Sample());
        System.out.println(classLayout2.toPrintable());

    }

}

class Sample {

    int i;
    String name;
    byte b;
    Object o;

}